Software Interrupts

The ARM has a number of ways to enter privileged modes in order to perform operations which are not permitted to tasks running in usr mode. One of these ways is via a Software Interrupt instruction, or swi for short which causes the processor to enter svc mode and jump to address 0x08. This would normally be a branch into the part of the kernel that will take appropriate action. 8 bits of the 32-bit instruction are used for the condition code and to indicate that this is a SWI. This leaves a 24-bit field in this instruction which is not interpreted by the processor, and this can be used to decide what action to take. svc mode has its own private R13_svc and R14_svc. The address of the instruction following the swi instruction is placed in R14_svc by the processor. R13_svc should have been previously set up to point to the kernel stack; this is generally part of the bootstrap code.